// 有序列表样式常量定义
export interface OrderedListOption {
  value: string;
  label: string;
  preview: Array<{
    marker: string;
    content: string;
  }>;
}

export const ORDERED_LIST_OPTIONS: OrderedListOption[] = [
  // 数字类型
  {
    value: "decimal",
    label: "阿拉伯数字",
    preview: [
      { marker: "1.", content: "列表项" },
      { marker: "2.", content: "列表项" },
      { marker: "3.", content: "列表项" },
    ],
  },
  {
    value: "decimal-leading-zero",
    label: "前导零数字",
    preview: [
      { marker: "01.", content: "列表项" },
      { marker: "02.", content: "列表项" },
      { marker: "03.", content: "列表项" },
    ],
  },
  // 字母类型
  {
    value: "lower-alpha",
    label: "小写字母",
    preview: [
      { marker: "a.", content: "列表项" },
      { marker: "b.", content: "列表项" },
      { marker: "c.", content: "列表项" },
    ],
  },
  {
    value: "upper-alpha",
    label: "大写字母",
    preview: [
      { marker: "A.", content: "列表项" },
      { marker: "B.", content: "列表项" },
      { marker: "C.", content: "列表项" },
    ],
  },
  // 罗马数字类型
  {
    value: "lower-roman",
    label: "小写罗马数字",
    preview: [
      { marker: "i.", content: "列表项" },
      { marker: "ii.", content: "列表项" },
      { marker: "iii.", content: "列表项" },
    ],
  },
  {
    value: "upper-roman",
    label: "大写罗马数字",
    preview: [
      { marker: "I.", content: "列表项" },
      { marker: "II.", content: "列表项" },
      { marker: "III.", content: "列表项" },
    ],
  },
  // CJK类型
  {
    value: "cjk-decimal",
    label: "汉字数字",
    preview: [
      { marker: "一.", content: "列表项" },
      { marker: "二.", content: "列表项" },
      { marker: "三.", content: "列表项" },
    ],
  },
  {
    value: "paren-decimal",
    label: "阿拉伯数字（带括号）",
    preview: [
      { marker: "（1）", content: "列表项" },
      { marker: "（2）", content: "列表项" },
      { marker: "（3）", content: "列表项" },
    ],
  },
  {
    value: "cjk-paren-upper",
    label: "中文大写（带括号）",
    preview: [
      { marker: "（一）", content: "列表项" },
      { marker: "（二）", content: "列表项" },
      { marker: "（三）", content: "列表项" },
    ],
  },
  // 其他类型
  {
    value: "lower-greek",
    label: "小写希腊字母",
    preview: [
      { marker: "α.", content: "列表项" },
      { marker: "β.", content: "列表项" },
      { marker: "γ.", content: "列表项" },
    ],
  },
  {
    value: "armenian",
    label: "亚美尼亚数字",
    preview: [
      { marker: "Ա.", content: "列表项" },
      { marker: "Բ.", content: "列表项" },
      { marker: "Գ.", content: "列表项" },
    ],
  },
  {
    value: "georgian",
    label: "格鲁吉亚数字",
    preview: [
      { marker: "ა.", content: "列表项" },
      { marker: "ბ.", content: "列表项" },
      { marker: "გ.", content: "列表项" },
    ],
  },
];

// 无序列表样式常量定义
export interface BulletListOption {
  value: string;
  label: string;
  preview: Array<{
    marker: string;
    content: string;
  }>;
}

// 页边距选项接口定义
export interface PageMarginOption {
  label: string;
  margin: {
    top: number;
    bottom: number;
    left: number;
    right: number;
  };
}

// 页边距预设选项
export const PAGE_MARGIN_OPTIONS: PageMarginOption[] = [
  {
    label: "常规",
    margin: {
      top: 2.54,
      bottom: 2.54,
      left: 3.18,
      right: 3.18,
    },
  },
  {
    label: "窄",
    margin: {
      top: 1.27,
      bottom: 1.27,
      left: 1.27,
      right: 1.27,
    },
  },
  {
    label: "适中",
    margin: {
      top: 2.54,
      bottom: 2.54,
      left: 1.91,
      right: 1.91,
    },
  },
  {
    label: "宽",
    margin: {
      top: 2.54,
      bottom: 2.54,
      left: 5.08,
      right: 5.08,
    },
  },
];

export const BULLET_LIST_OPTIONS: BulletListOption[] = [
  {
    value: "disc",
    label: "实心圆点",
    preview: [
      { marker: "•", content: "列表项" },
      { marker: "•", content: "列表项" },
      { marker: "•", content: "列表项" },
    ],
  },
  {
    value: "circle",
    label: "空心圆点",
    preview: [
      { marker: "○", content: "列表项" },
      { marker: "○", content: "列表项" },
      { marker: "○", content: "列表项" },
    ],
  },
  {
    value: "square",
    label: "方块",
    preview: [
      { marker: "■", content: "列表项" },
      { marker: "■", content: "列表项" },
      { marker: "■", content: "列表项" },
    ],
  },
  {
    value: "none",
    label: "无标记",
    preview: [
      { marker: "", content: "列表项" },
      { marker: "", content: "列表项" },
      { marker: "", content: "列表项" },
    ],
  },
];

// 根据类型获取对应的序号标识符
export const getBulletStyleIcon = (value: string): string => {
  const iconMap: Record<string, string> = {
    disc: "•",
    circle: "○",
    square: "■",
    none: "空",
  };
  return iconMap[value] || "?";
};

// 根据类型获取对应的有序列表标识符
export const getOrderedStyleIcon = (value: string): string => {
  const iconMap: Record<string, string> = {
    decimal: "1",
    "decimal-leading-zero": "01",
    "lower-alpha": "a",
    "upper-alpha": "A",
    "lower-roman": "i",
    "upper-roman": "I",
    "cjk-decimal": "一",
    hiragana: "あ",
    katakana: "ア",
    "lower-greek": "α",
    armenian: "Ա",
    georgian: "ა",
  };
  return iconMap[value] || "?";
};

export const defaultDicts = {
  fonts: [
    {
      label: { en_US: "Default Font", zh_CN: "默认字体" },
      value: null,
    },
    {
      label: { en_US: "Songti", zh_CN: "宋体" },
      value: "SimSun",
    },
    {
      label: { en_US: "Heiti", zh_CN: "黑体" },
      value: "SimHei",
    },
    {
      label: { en_US: "Kaiti", zh_CN: "楷体" },
      value: "KaiTi",
    },
    {
      label: {
        en_US: "Kaiti GB2312",
        zh_CN: "楷体_GB2312",
      },
      value: "KaiTi_GB2312",
    },
    {
      label: { en_US: "Fangsong", zh_CN: "仿宋" },
      value: "FangSong",
    },
    {
      label: {
        en_US: "Fangsong GB2312",
        zh_CN: "仿宋_GB2312",
      },
      value: "FangSong_GB2312",
    },
    {
      label: { en_US: "STSong", zh_CN: "华文宋体" },
      value: "STSong",
    },
    {
      label: { en_US: "STFangsong", zh_CN: "华文仿宋" },
      value: "STFangsong",
    },
    {
      label: {
        en_US: "FZ Fangsong Simplified",
        zh_CN: "方正仿宋简体",
      },
      value: "FZFangSong-Z02S",
    },
    {
      label: {
        en_US: "FZ Xiaobiao Song",
        zh_CN: "方正小标宋",
      },
      value: "FZXiaoBiaoSong-B05S",
    },
    {
      label: {
        en_US: "Microsoft Yahei",
        zh_CN: "微软雅黑",
      },
      value: "Microsoft Yahei",
    },
    { label: "Arial", value: "Arial" },
    { label: "Times New Roman", value: "Times New Roman" },
    { label: "Verdana", value: "Verdana" },
    { label: "Helvetica", value: "Helvetica" },
    { label: "Calibri", value: "Calibri" },
    { label: "Cambria", value: "Cambria" },
    { label: "Tahoma", value: "Tahoma" },
    { label: "Georgia", value: "Georgia" },
    { label: "Comic Sans MS", value: "Comic Sans MS" },
    { label: "Impact", value: "Impact" },
  ],
  // prettier-ignore
  colors: [
    '#ffffff', '#000000', '#e8e8e8', '#0e2841', '#156082', '#e97132',
    '#196b24', '#0f9ed5', '#a02b93', '#4ea72e', '#f2f2f2', '#7f7f7f',
    '#d0d0d0', '#dbe9f7', '#c1e4f5', '#fae2d6', '#c1f0c8', '#caedfb',
    '#f1ceee', '#d9f2d0', '#d8d8d8', '#595959', '#aeaeae', '#a6c9eb',
    '#83caeb', '#f6c6ac', '#84e291', '#95dcf7', '#e49edd', '#b3e5a1',
    '#bfbfbf', '#3f3f3f', '#747474', '#4d94d8', '#45b0e1', '#f1a984',
    '#47d45a', '#60cbf3', '#d76dcc', '#8ed873', '#a5a5a5', '#262626',
    '#3a3a3a', '#215e99', '#0f4861', '#bf4f14', '#12501b', '#0b769f',
    '#78206e', '#3a7d22', '#7f7f7f', '#0c0c0c', '#171717', '#153d64',
    '#0a3041', '#7f340d', '#0c3512', '#074f6a', '#501549', '#265316'
  ],
  standardColors: [
    "#c00000", // 深红
    "#ee0000", // 红色
    "#ffc000", // 橙色
    "#ffff00", // 黄色
    "#92d050", // 浅绿
    "#00b050", // 绿色
    "#00b0f0", // 浅蓝
    "#0070c0", // 蓝色
    "#002060", // 深蓝
    "#7030a0", // 紫色
  ],
  lineHeights: [
    {
      label: { en_US: "Single", zh_CN: "1.0" },
      value: 1.0,
    },
    {
      label: {
        en_US: "1.15 Line Spacing",
        zh_CN: "1.15",
      },
      value: 1.15,
    },
    {
      label: {
        en_US: "1.5 Line Spacing",
        zh_CN: "1.5",
      },
      value: 1.5,
      default: true,
    },
    {
      label: { en_US: "Double", zh_CN: "2.0" },
      value: 2.0,
    },
    {
      label: {
        en_US: "2.5 Line Spacing",
        zh_CN: "2.5",
      },
      value: 2.5,
    },
    {
      label: { en_US: "Triple", zh_CN: "3.0" },
      value: 3.0,
    },
  ],
  fontSizes: [
    { label: { en_US: "Default", zh_CN: "默认" }, value: "default" },
    { label: { en_US: "初号", zh_CN: "初号" }, value: "42pt" },
    { label: { en_US: "小初", zh_CN: "小初" }, value: "36pt" },
    { label: { en_US: "一号", zh_CN: "一号" }, value: "26pt" },
    { label: { en_US: "小一", zh_CN: "小一" }, value: "24pt" },
    { label: { en_US: "二号", zh_CN: "二号" }, value: "22pt" },
    { label: { en_US: "小二", zh_CN: "小二" }, value: "18pt" },
    { label: { en_US: "三号", zh_CN: "三号" }, value: "16pt" },
    { label: { en_US: "小三", zh_CN: "小三" }, value: "15pt" },
    { label: { en_US: "四号", zh_CN: "四号" }, value: "14pt" },
    { label: { en_US: "小四", zh_CN: "小四" }, value: "12pt" },
    { label: { en_US: "五号", zh_CN: "五号" }, value: "10.5pt" },
    { label: { en_US: "小五", zh_CN: "小五" }, value: "9pt" },
    { label: { en_US: "六号", zh_CN: "六号" }, value: "7.5pt" },
    { label: { en_US: "9", zh_CN: "9" }, value: "9pt" },
    { label: { en_US: "10", zh_CN: "10" }, value: "10pt" },
    { label: { en_US: "11", zh_CN: "11" }, value: "11pt" },
    { label: { en_US: "12", zh_CN: "12" }, value: "12pt" },
    { label: { en_US: "14", zh_CN: "14" }, value: "14pt" },
    { label: { en_US: "16", zh_CN: "16" }, value: "16pt" },
    { label: { en_US: "18", zh_CN: "18" }, value: "18pt" },
    { label: { en_US: "20", zh_CN: "20" }, value: "20pt" },
    { label: { en_US: "22", zh_CN: "22" }, value: "22pt" },
    { label: { en_US: "24", zh_CN: "24" }, value: "24pt" },
    { label: { en_US: "26", zh_CN: "26" }, value: "26pt" },
    { label: { en_US: "28", zh_CN: "28" }, value: "28pt" },
    { label: { en_US: "36", zh_CN: "36" }, value: "36pt" },
    { label: { en_US: "42", zh_CN: "42" }, value: "42pt" },
    { label: { en_US: "48", zh_CN: "48" }, value: "48pt" },
    { label: { en_US: "72", zh_CN: "72" }, value: "72pt" },
  ],
  headings: [
    { label: { en_US: "Paragraph", zh_CN: "正文" }, value: "paragraph" },
    { label: { en_US: "Heading 1", zh_CN: "标题 1" }, value: "heading-1" },
    { label: { en_US: "Heading 2", zh_CN: "标题 2" }, value: "heading-2" },
    { label: { en_US: "Heading 3", zh_CN: "标题 3" }, value: "heading-3" },
    { label: { en_US: "Heading 4", zh_CN: "标题 4" }, value: "heading-4" },
    { label: { en_US: "Heading 5", zh_CN: "标题 5" }, value: "heading-5" },
    { label: { en_US: "Heading 6", zh_CN: "标题 6" }, value: "heading-6" },
  ],
  symbols: [
    {
      label: {
        en_US: "Plain Text",
        zh_CN: "普通文本",
      },
      items: "‹›«»‘’“”‚„¡¿‥…‡‰‱‼⁈⁉⁇©®™§¶⁋",
    },
    {
      label: {
        en_US: "Currency Symbols",
        zh_CN: "货币符号",
      },
      items: "$€¥£¢₠₡₢₣₤¤₿₥₦₧₨₩₪₫₭₮₯₰₱₲₳₴₵₶₷₸₹₺₻₼₽",
    },
    {
      label: {
        en_US: "Mathematical Symbols",
        zh_CN: "数学符号",
      },
      items: "<>≤≥–—¯‾°−±÷⁄×ƒ∫∑∞√∼≅≈≠≡∈∉∋∏∧∨¬∩∪∂∀∃∅∇∗∝∠¼½¾",
    },
    {
      label: { en_US: "Arrows", zh_CN: "箭头" },
      items: "←→↑↓⇐⇒⇑⇓⇠⇢⇡⇣⇤⇥⤒⤓↨",
    },
    {
      label: {
        en_US: "Latin Script",
        zh_CN: "拉丁语",
      },
      items:
        "ĀāĂăĄąĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬĭĮįİıĲĳĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňŉŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſ",
    },
  ],
  emojis: [
    {
      label: {
        en_US: "Emotions & People",
        zh_CN: "表情与角色",
      },
      items:
        "😀 😃 😄 😁 😆 😅 🤣 😂 🙂 🙃 😉 😊 😇 🥰 😍 🤩 😘 😗 😚 😙 😋 😛 😜 🤪 😝 🤑 🤗 🤭 🤫 🤔 🤐 🤨 😐 😑 😶 😶‍ 😏 😒 🙄 😬 😮‍ 🤥 😌 😔 😪 🤤 😴 😷 🤒 🤕 🤢 🤮 🤧 🥵 🥶 🥴 😵 😵‍💫 🤯 🤠 🥳 😎 🤓 🧐 😕 😟 🙁 ☹️ 😮 😯 😲 😳 🥺 😦 😧 😨 😰 😥 😢 😭 😱 😖 😣 😞 😓 😩 😫 🥱 😤 😡 😠 🤬 😈 👿 💀 ☠️ 💩 🤡 👹 👺 👻 👽 👾 🤖 👋 🤚 🖐️ ✋ 🖖 👌 🤏 ✌️ 🤞 🤟 🤘 🤙 👈 👉 👆 🖕 👇 ☝️ 👍 👎 ✊ 👊 🤛 🤜 👏 🙌 👐 🤲 🤝 🙏 ✍️ 💅 🤳 💪 🦾 🦿 🦵 🦶 👂 🦻",
    },
    {
      label: {
        en_US: "Animals & Nature",
        zh_CN: "动物与自然",
      },
      items:
        "🐵 🐒 🦍 🦧 🐶 🐕 🦮 🐕‍🦺 🐩 🐺 🦊 🦝 🐱 🐈 🐈‍⬛ 🦁 🐯 🐅 🐆 🐴 🐎 🦄 🦓 🦌 🐮 🐂 🐃 🐄 🐷 🐖 🐗 🐽 🐏 🐑 🐐 🐪 🐫 🦙 🦒 🐘 🦏 🦛 🐭 🐁 🐀 🐹 🐰 🐇 🐿️ 🦔 🦇 🐻 🐻‍❄️ 🐨 🐼 🦥 🦦 🦨 🦘 🦡 🐾 🦃 🐔 🐓 🐣 🐤 🐥 🐦 🐧 🕊️ 🦅 🦆 🦢 🦉 🦩 🦚 🦜 🐸 🐊 🐢 🦎 🐍 🐲 🐉 🦕 🦖 🐳 🐋 🐬 🦭 🐟 🐠 🐡 🦈 🐙 🐚 🐌 🦋 🐛 🐜 🐝 🐞 🦗 🕷️ 🕸️ 🦂 🦟 🦠 💐 🌸 💮 🏵️ 🌹 🥀 🌺 🌻 🌼 🌷 🌱 🌲 🌳 🌴 🌵 🌾 🌿 ☘️ 🍀 🍁 🍂 🍃 🌒 🌓 🌔 🌕 🌖 🌗 🌘 🌙 🌚 🌛 🌜 ☀️ 🌝 🌞 🪐 🌟 🌠 🌌 ☁️ ⛅ ⛈️ 🌤️ 🌥️ 🌦️ 🌧️ 🌨️ 🌩️ 🌪️ 🌫️ 🌬️ 🌀 🌈 🌂 ☂️ ☔ ⛱️ ⚡ ❄️ ☃️ ⛄ ☄️ 🔥 💧 🌊",
    },
    {
      label: {
        en_US: "Food & Drink",
        zh_CN: "食物与食品",
      },
      items:
        "🍇 🍉 🍊 🍋 🍌 🍍 🥭 🍎 🍏 🍐 🍑 🍒 🍓 🥝 🍅 🥥 🥑 🍆 🥔 🥕 🌽 🌶️ 🥬 🥦 🧄 🧅 🍄 🥜 🌰 🍞 🥐 🥖 🥨 🥯 🥞 🧇 🧀 🍖 🍗 🥩 🥓 🍔 🍟 🍕 🌭 🥪 🌮 🌯 🥙 🧆 🥚 🍳 🥘 🍲 🥣 🥗 🍿 🧈 🧂 🥫 🍱 🍘 🍙 🍚 🍛 🍜 🍝 🍠 🍢 🍣 🍤 🍥 🥮 🍡 🥟 🥠 🥡 🦀 🦞 🦐 🦑 🦪 🍦 🍧 🍨 🍩 🍪 🎂 🍰 🧁 🥧 🍫 🍬 🍭 🍮 🍯 🍼 🥛 ☕ 🍵 🍶 🍾 🍷 🍸 🍹 🍺 🍻 🥂 🥃 🥤 🧃 🧉 🧊 🥢 🍽️ 🍴 🥄 🔪 🏺",
    },
    {
      label: { en_US: "Activities", zh_CN: "活动" },
      items:
        "🧧 🎁 🎄 🧨 ✨ 🎈 🎉 🏮 🎗️ 🎟️ 🎫 🎖️ 🏆 🏅 🥇 🥈 🥉 ⚽ ⚾ 🥎 🏀 🏐 🏈 🏉 🎾 🥏 🎳 🏏 🏑 🏒 🥍 🏓 🏸 🥊 🥋 🥅 ⛳ ⛸️ 🎣 🤿 🎽 🎿 🛷 🥌 🎯 🪀 🪁 🎱 🔮 🧿 🎮 🕹️ 🎰 🎲 🧩 🧸 ♟️ 🃏 🀄 🎴 🎭 🖼️ 🎨 🧵 🧶",
    },
    {
      label: {
        en_US: "Travel & Places",
        zh_CN: "旅行与景点",
      },
      items:
        "🚈 🚉 🚊 🚝 🚞 🚋 🚌 🚍 🚎 🚐 🚑 🚒 🚓 🚔 🚕 🚖 🚗 🚘 🚙 🚚 🚛 🚜 🏎️ 🏍️ 🛵 🦽 🦼 🛺 🚲 🛴 🛹 🚏 🛣️ 🛤️ 🛢️ ⛽ 🚨 🚥 🚦 🛑 🚧 ⚓ ⛵ 🛶 🚤 🛳️ ⛴️ 🛥️ 🚢 ✈️ 🛩️ 🛫 🛬 🪂 💺 🚁 🚟 🚠 🚡 🛰️ 🚀 🛸 🛎️ 🧳 🧭 ⌚ ⏰ ⏱️ ⏲️ 🕰️ 🕛 🕧 🕐 🕜 🕑 🕝 🕒 🕞 🕓 🕟 🕔 🕠 🕕 🕡 🕖 🕢 🕗 🕣 🕘 🕤 🕙 🕥 🕚 🕦",
    },
    {
      label: { en_US: "Objects", zh_CN: "物品" },
      items:
        "📔 📕 📖 📗 📘 📙 📚 📒 📃 📜 📄 📰 🗞️ 📑 🔖 🏷️ 💰 🔍 🔎 💴 💵 💶 💷 💸 💳 🧾 💹 ✉️ 📧 📨 📩 📤 📥 📦 📫 📪 📬 📭 📮 🗳️ ✏️ ✒️ 🖋️ 🖊️ 🖌️ 🖍️ 📝 💼 📁 📂 🗂️ 📅 📆 🗒️ 🗓️ 📇 📈 📉 📊 📋 📌 📍 📎 🖇️ 📏 📐 ✂️ 🗃️ 🗄️ 🗑️ 🔒 🔓 🔏 🔐 🔑 🗝️ 🔨 🪓 ⛏️ ⚒️ 🛠️ 🗡️ ⚔️ 🔫 🏹 🛡️ 🔧 🔩 ⚙️ 🗜️ ⚖️ 🦯 🔗 ⛓️ 🧰 🧲 ⚗️ 🧪 🧫 🧬 🔬 🔭 📡 💉 🩸 💊 🩹 🩺 🚪 🛏️ 🛋️ 🪑 🚽 🚿 🛁 🪒 🧴 🧷 🧹 🧺 🧻 🧼 🧽 🧯 🛒 🚬 ⚰️ ⚱️ 💎 🔇 🔈 🔉 🔊 🔔 🔕 🔋 🔌 💻 🖥️ 🖨️ ⌨️ 🖱️ 🖲️ 📷 🧱",
    },
    {
      label: { en_US: "Symbols", zh_CN: "符号" },
      items:
        "💡 ✅ ☑️ ✔️ ❌ ❎ ❓ ❗ ❔ ❕ ⌛ ⏳ 💰 🆒 🆕 🆖 🅾️ 🆗 🆘 🈲 🉑 🈸 ⛔ 🚫 📵 ✳️ ✴️ ❇️ 🔟 🔠 🔡 🔢 🔣 🔤 🅰️ 🆎 🅱️ 🆑 🆒 🆓 ℹ️ 🆔 🆕 🆖 🅾️ 🆗 🅿️ 🆘 🆙 🆚 🈁 🈂️ 🔴 🟠 🟡 🟢 🔵 🟣 🟤 ⚫ ⚪ 🟥 🟧 🟨 🟩 🟦 🟪 🟫 🔶 🔷 🔸 🔹 🔺 🔻 💠 🔘 🔳 🔲 💌 💘 💝 💖 💗 💓 💞 💕 💟 ❣️ 💔 🤍 💯 💢 💥 💬 💤 ➰ ➿ 🔅 📴 ➡️ 🔃 🔄 🔙 🔚 🔛 🔝 🔀 🔁 🔂",
    },
    {
      label: { en_US: "Flags", zh_CN: "旗帜" },
      items: "🏁 🚩 🏴 🏳️ 🏳️‍🌈‍",
    },
  ],
  pageSizes: [
    {
      label: {
        en_US: "Custom",
        zh_CN: "自定义",
      },
      width: 0,
      height: 0,
    },
    { label: "A4", width: 21.0, height: 29.7, default: true },
    { label: "A3", width: 29.7, height: 42.0 },
    { label: "A5", width: 14.8, height: 21.0 },
    { label: "B5", width: 17.6, height: 25.0 },
    {
      label: {
        en_US: "8mo",
        zh_CN: "8开",
      },
      width: 26.0,
      height: 36.8,
    },
    {
      label: {
        en_US: "16mo",
        zh_CN: "16开",
      },
      width: 18.4,
      height: 26.0,
    },
    {
      label: {
        en_US: "Large 16mo",
        zh_CN: "大16开",
      },
      width: 21.0,
      height: 28.5,
    },
    {
      label: {
        en_US: "32mo",
        zh_CN: "32开",
      },
      width: 13.0,
      height: 18.4,
    },
    {
      label: {
        en_US: "Large 32mo",
        zh_CN: "大32开",
      },
      width: 14.8,
      height: 20.3,
    },
    { 
      label: {
        en_US: "No. 3 Envelope",
        zh_CN: "3号信封",
      }, 
      width: 12.5, 
      height: 17.6
    },
    {
      label: {
        en_US: "No. 5 Envelope",
        zh_CN: "5号信封",
      },
      width: 10.9,
      height: 12.9,
    },
    {
      label: {
        en_US: "No. 6 Envelope",
        zh_CN: "6号信封",
      },
      width: 11.9,
      height: 22.9,
    },
    {
      label: {
        en_US: "No. 7 Envelope",
        zh_CN: "7号信封",
      },
      width: 16.1,
      height: 22.8,
    },
    {
      label: {
        en_US: "No. 9 Envelope",
        zh_CN: "9号信封",
      },
      width: 22.8,
      height: 32.3,
    },
    {
      label: {
        en_US: "Legal Paper",
        zh_CN: "法律用纸",
      },
      width: 21.5,
      height: 33.5,
    },
    {
      label: {
        en_US: "Letter Paper",
        zh_CN: "信纸",
      },
      width: 21.5,
      height: 27.9,
    },
  ],
  linkTypes: [
    {
      label: { en_US: "Web Page", zh_CN: "网页" },
      value: "web",
      icon: "i-ri-global-line",
    },
  ],
};

export const defaultWebPages = [
  {
    label: {
      zh_CN: "哔哩哔哩",
      en_US: "Bilibili",
    },
    icon: '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11.39 3.714h.5c.88.032 1.614.337 2.2.918.586.58.889 1.312.91 2.194v4.293c-.021.88-.324 1.615-.91 2.201-.586.586-1.32.889-2.2.91H4.11c-.88-.021-1.614-.324-2.2-.91-.586-.586-.889-1.32-.91-2.2V6.825c.021-.882.324-1.613.91-2.194.586-.58 1.32-.886 2.2-.918h.452l-.684-.653a.72.72 0 0 1-.218-.529.72.72 0 0 1 .218-.529l.015-.015a.763.763 0 0 1 .537-.218c.202 0 .38.072.537.218L6.63 3.59c.041.041.078.083.109.124h2.49a.487.487 0 0 1 .092-.124l1.665-1.602a.763.763 0 0 1 .536-.218c.203 0 .386.088.542.233a.691.691 0 0 1 .228.53.72.72 0 0 1-.217.528l-.685.653zm-7.28 1.51c-.434.01-.8.16-1.096.45-.295.29-.448.66-.458 1.105v4.387c.01.445.163.813.458 1.104.296.29.662.441 1.097.45h7.778c.435-.009.801-.16 1.097-.45.295-.29.448-.659.458-1.104V6.779c-.01-.446-.163-.814-.458-1.105a1.563 1.563 0 0 0-1.097-.45H4.111zm1.557 2.255c.217 0 .399.072.544.218a.809.809 0 0 1 .233.56v.684a.809.809 0 0 1-.233.56.736.736 0 0 1-.544.218.739.739 0 0 1-.545-.218.809.809 0 0 1-.233-.56v-.684c0-.218.075-.402.225-.553a.753.753 0 0 1 .553-.225zm4.666 0c.218 0 .4.072.545.218a.809.809 0 0 1 .233.56v.684a.809.809 0 0 1-.233.56.737.737 0 0 1-.545.218.739.739 0 0 1-.544-.218.809.809 0 0 1-.233-.56v-.684a.809.809 0 0 1 .233-.56.738.738 0 0 1 .544-.218z" fill="#07A3D7"/></svg>',
    validate(url: string) {
      const pattern = /^https?:\/\/(www\.)?bilibili\.com\/video\/[a-zA-Z0-9]+/;
      return pattern.test(url);
    },
    transformURL(url: string) {
      const videoId = url.match(/\/video\/([a-zA-Z0-9]+)/)?.[1];
      return videoId
        ? `https://player.bilibili.com/player.html?bvid=${videoId}`
        : "";
    },
  },
  {
    label: {
      zh_CN: "优酷",
      en_US: "Youku",
    },
    icon: '<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M270.528 902.592c-82.688-45.952-104.576-161.984-43.072-232 26.688-30.208 214.592-142.784 229.632-137.344 17.088 5.504 7.488-.64-112.768-71.36-105.92-62.464-129.152-83.776-144.896-129.792-34.816-105.664 58.112-218.944 166.08-202.496 24.576 4.096 102.528 42.56 175.616 87.168 13.696 8.32 70.4 41.216 125.76 73.472 119.616 69.376 153.792 97.472 178.368 148.288 20.48 41.856 24.576 100.928 10.24 151.68-8.896 32.32-41.664 78.976-71.04 100.992l-19.2 14.4-33.408-19.2c-19.2-11.008-34.176-17.92-34.176-15.808 0 1.344 12.288 10.24 27.328 18.56 15.04 8.896 27.328 17.152 27.328 19.2 0 4.8-281.6 168.832-334.208 194.24-51.904 26.112-100.48 26.112-147.584 0z" fill="#018EFF"/><path d="M665.984 654.4c0-1.088-6.912-5.888-15.936-10.624-20.16-10.112-21.248-5.888-1.088 4.736 16.512 9.024 17.024 9.6 17.024 5.888zm-50.56 5.952c-8.448-7.424-55.744-33.408-55.744-30.72 0 2.56 53.632 35.008 58.432 35.52 1.024 0 0-2.112-2.688-4.8z" fill="#018EFF"/><path d="M673.472 653.44a4171.008 4171.008 0 0 0-126.336-72.768c-43.712-24.064-92.224-52.864-233.6-137.344C238.4 398.72 213.76 374.016 199.424 332.16c-34.816-105.664 58.048-218.944 166.016-202.496 24.576 4.096 102.4 42.56 175.552 87.168 13.632 8.32 70.336 41.216 125.632 73.472 114.112 65.92 146.88 92.032 170.752 133.184 47.872 81.728 29.44 195.008-40.96 257.472-13.632 11.648-27.968 21.248-32.768 21.248-4.8-.64-45.12-21.952-90.176-48.704z" fill="#FF396E"/><path d="M270.464 902.592A152.32 152.32 0 0 1 193.28 781.76c-6.144-76.8 21.184-115.328 130.496-179.84l75.136-44.608L568.96 630.08c93.568 39.808 172.8 72.064 176.256 72.064 4.096 0 6.784 2.048 6.784 5.504 0 5.504-273.216 165.44-334.016 194.944-51.84 26.112-100.352 26.112-147.52 0z" fill="#00BEFF"/></svg>',
    validate(url: string) {
      const pattern = /^https?:\/\/v\.youku\.com\/v_show\/id_[a-zA-Z0-9]+/;
      return pattern.test(url);
    },
    transformURL(url: string) {
      const videoId = url.match(/\/id_([a-zA-Z0-9]+)/)?.[1];
      return videoId ? `https://player.youku.com/embed/${videoId}` : "";
    },
  },
  {
    label: {
      zh_CN: "Figma",
      en_US: "Figma",
    },
    icon: '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.324 8c0-1.475 1.2-2.675 2.675-2.675 1.475 0 2.675 1.2 2.675 2.675 0 1.475-1.2 2.675-2.675 2.675A2.678 2.678 0 0 1 8.324 8z" fill="#1ABCFE"/><path d="M3 13.325c0-1.475 1.2-2.675 2.675-2.675h2.65v2.675C8.325 14.8 7.125 16 5.65 16 4.175 16 3 14.8 3 13.325z" fill="#0ACF83"/><path d="M8.324 0v5.325H11c1.475 0 2.675-1.2 2.675-2.675C13.674 1.175 12.474 0 11 0H8.324z" fill="#FF7262"/><path d="M3 2.675C3 4.15 4.2 5.35 5.675 5.35h2.65V0H5.65C4.175 0 3 1.2 3 2.675z" fill="#F24E1E"/><path d="M3 8c0 1.475 1.2 2.675 2.675 2.675h2.65v-5.35H5.65C4.175 5.325 3 6.525 3 8z" fill="#A259FF"/></svg>',
    validate(url: string) {
      const pattern = /^https?:\/\/www\.figma\.com\/file\/[a-zA-Z0-9]+/;
      return pattern.test(url);
    },
    transformURL(url: string) {
      const fileId = url.match(/\/file\/([a-zA-Z0-9]+)/)?.[1];
      return fileId
        ? `https://www.figma.com/embed?embed_host=share&url=https://www.figma.com/file/${fileId}`
        : "";
    },
  },
  {
    label: {
      zh_CN: "墨刀",
      en_US: "MockingBot",
    },
    icon: '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M2 3h2.715v4.752H2V3zm6.958 0H6.242v4.752h2.716V3zm4.582 0h-2.716v4.752h2.716V3zM9.107 14l-1.096-2.5a3.905 3.905 0 0 0 2.812-3.748h2.716A6.621 6.621 0 0 1 9.107 14z" fill="#F33"/></svg>',
    validate(url: string) {
      const pattern = /^https?:\/\/modao\.cc\/app\/[a-zA-Z0-9]+/;
      return pattern.test(url);
    },
    transformURL(url: string) {
      return url;
    },
  },
  {
    label: {
      zh_CN: "腾讯视频",
      en_US: "Tencent Video",
    },
    icon: '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5.314 14.541c-1.416-.025-1.71-1.416-1.964-3.16-.155-1.06-.182-2.155-.182-3.23 0-1.074.027-2.169.182-3.23.31-2.14.685-3.75 3.123-2.95 2.336.768 4.586 2.126 6.56 3.67.1.085.209.177.324.272.705.59 1.62 1.355 1.642 2.239-.021.882-.936 1.647-1.641 2.237-.115.096-.225.187-.324.274-1.975 1.543-4.225 2.901-6.561 3.67-.418.136-.774.203-1.08.208h-.08z" fill="#4396F7"/><path d="M2.98 13.143c-1.202-.029-1.527-.954-1.755-2.162l-.02-.1-.036-.206C1.025 9.847 1 8.991 1 8.152c0-.84.025-1.694.17-2.523l.036-.205.019-.1c.267-1.418.668-2.447 2.464-2.094-.151.487-.247 1.067-.339 1.692-.154 1.061-.181 2.156-.181 3.23 0 1.074.027 2.169.181 3.23.092.624.188 1.204.34 1.692a3.501 3.501 0 0 1-.592.07H2.98z" fill="#EF8E34"/><path fill-rule="evenodd" clip-rule="evenodd" d="M3.689 3.229c.125.025.256.055.395.094 2.181.6 4.28 1.66 6.124 2.866.66.483 1.812 1.16 1.834 1.962-.023.803-1.175 1.48-1.834 1.963-1.843 1.205-3.943 2.266-6.124 2.866-.139.038-.27.069-.395.094-.151-.488-.248-1.068-.338-1.693-.155-1.06-.182-2.156-.182-3.23 0-1.074.027-2.169.182-3.23.09-.62.185-1.197.335-1.683l.003-.009z" fill="#78E445"/><path d="M4.845 8.156c0-1.82.13-2.04.13-2.04.053-.234.18-.298.378-.241 0 0 .587.124 2.006.87 1.435.754 1.875 1.168 1.875 1.168.217.188.172.305 0 .483 0 0-.269.308-1.875 1.14-1.606.83-2.006.894-2.006.894-.239.056-.332-.015-.377-.24 0 0-.13-.21-.13-2.034z" fill="#fff"/></svg>',
    validate(url: string) {
      return url.startsWith("https://modao.cc/proto/");
    },
    transformURL(url: string) {
      const videoId = url.match(/\/cover\/[a-zA-Z0-9]+\/([a-zA-Z0-9]+)/)?.[1];
      return videoId
        ? `https://v.qq.com/iframe/player.html?vid=${videoId}`
        : "";
    },
  },
];

// 页面设置标签选项
export interface PageSettingsTabOption {
  label: string;
  value: "margin" | "paper" | "layout";
}

export const PAGE_SETTINGS_TAB_OPTIONS: PageSettingsTabOption[] = [
  { label: "页边距", value: "margin" },
  { label: "纸张", value: "paper" },
  { label: "布局", value: "layout" },
];

// 单位选项
export interface UnitOption {
  label: string;
  value: "pt" | "in" | "cm" | "mm";
}

export const UNIT_OPTIONS: UnitOption[] = [
  { label: "磅", value: "pt" },
  { label: "英寸", value: "in" },
  { label: "厘米", value: "cm" },
  { label: "毫米", value: "mm" },
];

// 页面底纹选项
export interface BackgroundOption {
  label: string;
  value: string;
}

export const BACKGROUND_OPTIONS: BackgroundOption[] = [
  { label: "白色", value: "#ffffff" },
  { label: "浅灰", value: "#f5f5f5" },
  { label: "浅蓝", value: "#e6f3ff" },
  { label: "浅绿", value: "#e6ffe6" },
  { label: "浅黄", value: "#f8f0d8" },
  { label: "网格", value: "grid" },
  { label: "横线", value: "lines" },
  { label: "点阵", value: "dots" },
  { label: "方格", value: "squares" },
];

// 工具栏标签页配置
export interface ToolbarTabConfig {
  label: string;
  name: string;
  disabled?: boolean;
}

export const TOOLBAR_TABS: ToolbarTabConfig[] = [
  { label: "开始", name: "home", disabled: false },
  { label: "插入", name: "insert", disabled: false },
  { label: "表格", name: "table", disabled: false },
  { label: "页面", name: "page", disabled: false },
  { label: "引用", name: "reference", disabled: false },
];